﻿<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" CodeFile="SenderList.aspx.cs"
    Inherits="SenderList" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>短 信 平 台 用 户 管 理</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="/images/style.css" rel="Stylesheet" />
    <script language="javascript" type="text/javascript" src="/js/jiazai.js"></script>
    <script src="/js/introbox.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript" src="/js/jquery-1.3.2.min.js"></script>
    <script language="javascript" type="text/javascript" src="/js/jquery-easyui/jquery.easyui.min.js"></script>
    <script language="javascript" type="text/javascript" src="/js/My97DatePicker/WdatePicker.js"></script>
    <script language="javascript" type="text/javascript" src="/js/pagefunction.js"></script>
</head>
<body style="overflow-x: hidden">
    <form id="form1" runat="server">
    <div>
        <table width="100%" class="tableBorder" border='1' cellspacing="0" style="border-collapse: collapse;"
            bgcolor="#ffffff" bordercolor="#cccccc">
            <tr align="center" valign="middle">
                <th height="22" colspan="88">
                    短 信 平 台 用 户 管 理
                </th>
            </tr>
            <tr>
                <td>
                    操作
                </td>
                <td>
                    <input type="button" class="btn" value="刷新" onclick="Refresh()" />
                    <asp:Button runat="server" ID="btnexcel" Text="导出Excel" OnClick="btnexcel_Click"
                        CssClass="btn" />
                    <input type="button" class="btn" value="添加" onclick="Go('?act=add')" />
                </td>
            </tr>
            <asp:Panel runat="server" ID="plop">
                <tr style='display: none'>
                    <td>
                        id
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="txbid"></asp:TextBox>
                    </td>
                </tr>
                <tr style='display: none'>
                    <td>
                        用户编码
                    </td>
                    <td>
                        <asp:TextBox runat="server" Enabled="false" ID="txbsenderID"></asp:TextBox>系统自动生成
                    </td>
                </tr>
                <tr>
                    <td>
                        用户名称
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="txbsendername"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        用户密码
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="txbpsw"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        联系电话
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="txbtel"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        地址
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="txbaddress"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        状态
                    </td>
                    <td>
                        <asp:DropDownList runat="server" ID="ddlstate">
                            <asp:ListItem Value="0">开通</asp:ListItem>
                            <asp:ListItem Value="1">禁止登陆</asp:ListItem>
                            <asp:ListItem Value="2">禁止短信</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                 <tr>
                    <td>
                        类型
                    </td>
                    <td>
                        <asp:DropDownList runat="server" ID="ddlutype">
                            <asp:ListItem Value="jiudian">酒店</asp:ListItem>                          
                            <asp:ListItem Value="lvdian">客房住宿</asp:ListItem>                            
                            <asp:ListItem Value="lvxingshe">旅行社</asp:ListItem>                            
                            <asp:ListItem Value="smsver">纯短信</asp:ListItem>                            
                            <asp:ListItem Value="zonghe">酒店住宿综合</asp:ListItem>                            
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        客户端标题
                    </td>
                    <td>
                        <asp:DropDownList runat="server" ID="ddlutitle">
                            <asp:ListItem Value="酒店好帮手">酒店好帮手</asp:ListItem>
                            <asp:ListItem Value="旅行社版">旅行社版</asp:ListItem>                            
                            <asp:ListItem Value="4S店版">4S店版</asp:ListItem>                            
                            <asp:ListItem Value="客房版">客房版</asp:ListItem>                            
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:Button runat="server" CssClass="btn" ID="btnSenderListOk" Text="确定" OnClick="btnSenderListOk_Click" />
                    </td>
                </tr>
            </asp:Panel>
        </table>
        <table align="center" width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td>
                    <asp:GridView ID="gvList" runat="server" AllowPaging="false" CellPadding="2" AutoGenerateColumns="False"
                        GridLines="Both" EmptyDataText="没有数据" CssClass="tableBorder" Width="100%">
                        <Columns>
                            <asp:BoundField DataField="id" HeaderText="id" />
                            <asp:BoundField DataField="senderID" HeaderText="用户编码" />
                            <asp:BoundField DataField="sendername" HeaderText="用户名" />
                            <asp:BoundField DataField="psw" HeaderText="用户密码" />  
                            <asp:BoundField DataField="utype" HeaderText="类型" />
                            <asp:BoundField DataField="utitle" HeaderText="客户端标题" />
                            <asp:TemplateField HeaderText="用户状态">
                                <ItemTemplate>
                                    <%#(Eval("state").ToString()=="0" )?"开通" :""%>
                                    <%#(Eval("state").ToString() == "1") ? "禁止登陆" : ""%>
                                    <%#(Eval("state").ToString() == "2") ? "禁止短信" : ""%>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="tel" HeaderText="电话" />
                            <asp:BoundField DataField="address" HeaderText="地址" />
                            <asp:TemplateField HeaderText="操作">
                                <ItemTemplate>
                                    <input class="btn" type="button" onclick="Go('?act=mod&id=<%#Eval("id") %>')" value="修改" />
                                    <input class="btn" type="button" onclick="javascript:if (confirm('您真的确定要删除吗？\n\n请确认！')==true){Go('?act=del&id=<%#Eval("id")%>')}else{return false}"
                                        value="删除" />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <PagerSettings Visible="False" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
        <asp:Literal runat="server" ID="litpager"></asp:Literal>
    </div>
    </form>
    <script language='javascript' type='text/javascript' src='/JS/tablecolor.js'></script>
    <script language='javascript'><!--
        TableColor('gvList', '#F1F8FE', '#FFFFFF', '#F8DC87', '#BCE774');
--></script>
</body>
</html>
